Hi there.
I have a proposed activity I'd like for you to solve.
The activity goes as this.
I want you to create a function that has two string parameters.
The strings can be whatever.
With those two strings, I want you to print both together with a space separating them.
Then have the function yield for 0.5 seconds afterwards.
Print the two strings together, but have both reversed yield again for another 0.5 seconds and then
finally print the two strings together, but have both capitalized after that print finished.
Then I want you to call this function ten times using a for loop.
So please take a minute or two to solve this activity and I'll show you my solution next.
Okay.
Our first understand that I need to create a function and that function needs to parameters.
So I'll create a new function here.
I'll call mine, handle strings and declare two parameters.
String one and string two.
Since both need to be strings, I'll declare the type as well.
But you don't have to.
Next operant string one.
Then concatenate it with the space.
And then concatenate the space with string to.
Afterwards.
I need a yield for 0.5 seconds, so I'll call the task weight function and past 0.5 is the argument.
Then I can call the print function again.
But this time the strings need to be reversed.
So I'll call the string reverse function inside the print function and pass string one concatenate it
with the space and then concatenate it with string to.
Then I will yield 4.5 seconds again.
Now all I need to do is print these uppercase.
So once more I call the print function and inside call the string upper function and pass string one.
Concatenate it with the space and then concatenate it with string to.
Now I can print finished.
Great.
Let's create a for loop next.
I'll set eye to one the max number for I will be ten and I'll increment by one each time to execute
ten times.
Let's call this function in my loop and I'll pass to random strings like, Hey there.
And howdy.
Run the game and see what happens.
Awesome.
Our function works.